<?php 
if (isset($_SESSION['daima'])){
    $code=$_SESSION['daima'];
}else{
    $code=rand(100,999);
    $_SESSION['daima']=$code;
}
if (isset($_SESSION['ids']) && !empty($_SESSION['ids'])){
    $id=$_SESSION['ids'];
}else{
    exit;
}
include './c/config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
$sql="SELECT * FROM `app_student` where id='".$id."' limit 0,1 "; //吴迪 赵岩
$query=$mysqli->query($sql);
if($query->num_rows>0){
   $userInfo=array();
   while ($list=$query->fetch_assoc()){
       $userInfo=$list;
   }
}else{
    exit;
}
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>上海市中学生市政大赛</title>
<style>
html,body{font-size:16px;background:#f1f1f4;width:100%;font-size:12px;color:#fff;font-family:Microsoft YaHei, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
body, div{position:relative;padding:0px;margin:0px auto;max-width:750px;}
.weui-dialog{position:fixed;z-index:5000;width:80%;max-width:300px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FFF;text-align:center;border-radius:3px;overflow:hidden}.weui-dialog__hd{padding:1.3em 1.6em .5em}.weui-dialog__title{font-weight:400;font-size:18px}.weui-dialog__bd{padding:0 1.6em .8em;min-height:40px;font-size:15px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.weui-dialog__bd:first-child{padding:1.2em 20px .1em;color:#353535}.weui-dialog__ft{position:relative;line-height:48px;font-size:18px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3CC51F;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative}.weui-dialog__btn:active{background-color:#EEE}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:#353535}.weui-dialog__btn_primary{color:#0BB20C}@media screen and (min-width:1024px){.weui-dialog{width:35%}}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6)}
.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}
.js_dialog{display:none;}
.weui-toast {position: fixed;z-index: 5000;width: 7.6em;min-height: 7.6em;top: 180px;left: 50%;margin-left: -3.8em;background: rgba(17, 17, 17, 0.7);text-align: center;border-radius: 5px;color: #FFFFFF;}
.weui-loading {width: 20px;height: 20px;display: inline-block;vertical-align: middle;
animation: weuiLoading 1s steps(12, end) infinite;background: transparent url() no-repeat;background-size: 100%;}
@-webkit-keyframes weuiLoading {
    0% {
        transform: rotate3d(0, 0, 1, 0deg);
    }

    100% {
        transform: rotate3d(0, 0, 1, 360deg);
    }
}
@keyframes weuiLoading {
    0% {
        transform: rotate3d(0, 0, 1, 0deg);
    }

    100% {
        transform: rotate3d(0, 0, 1, 360deg);
    }
}
.weui-icon_toast.weui-loading {
    margin: 30px 0 0;
    width: 38px;
    height: 38px;
    vertical-align: baseline;
}
.weui-toast__content {
    margin: 0 0 15px;
}
-webkit-touch-callout:none;
-webkit-user-select:none;
html{-ms-touch-action:none;}
div,img{-webkit-tap-highlight-color:rgba(0,0,0,0);}
*{-webkit-text-size-adjust: none;}
.simg{position:absolute;display:block;}
a{text-decoration:none;}
.txt{position:absolute;text-indent:8px;font-size:12px;z-index:2;border:none;background:transparent;}
.txt::-webkit-input-placeholder {color:#58595b;text-align:left;}
select{position:absolute;display:block;background:transparent;border:0px;text-indent:8px;font-size:12px;-webkit-appearance:none;}
.container{position:relative;width:100%;height:auto;overflow:hidden;}
.user{position:absolute;width:100%;height:100%;opacity:0;background:transparent url('<?php echo $cdnjsUrl; ?>/img/1.jpg') no-repeat;background-size:cover;}
    
.user-t1{position:absolute;width:100%;left:0;background:transparent url('<?php echo $cdnjsUrl; ?>/img/user-t1.png') no-repeat;background-size:cover;}
    
    
.fade-in{opacity:1;-webkit-transition:opacity 1s ease-in-out;-moz-transition: opacity 1s ease-in-out;-o-transition: opacity 1s ease-in-out;transition: opacity 1s ease-in-out;}
.p-bg{top:0px;left:0px;}
.user-body{position:absolute;width:100%;overflow-y:scroll;overflow-x:hidden;}
.user-bg{position:absolute;width:100%;}
.user-txt{position:absolute;width:auto;font-size:12px;color:#000;}
.user-title{position:absolute;width:100%;text-align:center;font-size:16px;font-weight:700;color:#000;}
.ltop, .lbotm{position:absolute;width:100%;left:0;display:block;}    
.ltop{top:0;}
.lbotm{bottom:0;}       
</style></head>
<body>
<div class="container">
  <div class="user page">
        <img class="ltop" src="<?php echo $cdnjsUrl; ?>/img/user-top.png">
        <img class="lbotm" src="<?php echo $cdnjsUrl; ?>/img/user-btm.png">
      <div class="user-t1">
           <div class="user-hao user-txt"><?php echo $userInfo['hao']; ?></div>
           <div class="user-name user-txt"><?php echo $userInfo['name']; ?></div>
           <div class="user-school user-txt"><?php echo $userInfo['school']; ?></div>
           <div class="user-zu user-txt"><?php echo $userInfo['zu']; ?></div>
           <div class="user-shijian user-txt"><?php echo $userInfo['shijian']; ?></div>
           <div class="user-kc user-txt"><?php echo $userInfo['kc']; ?></div>
          
           <div class="user-kdian user-txt">上海教育报刊总社</div>
           <div class="user-dizhi user-txt">徐汇区中山南二路151号（近大木桥路）</div> 
           <div class="user-jiaot user-txt">地铁4号线、12号线均为大木桥路站6号口，公交41、933、万周专线、隧道八线</div> 
           
           <a class="down-jk simg" href="附学生健康承诺书.docx">&nbsp;</a>
           <div class="down-zkao simg"></div>
      </div>
      
         
       
  </div>
  
  <div class="js_dialog">
       <div class="weui-mask"></div>
       <div class="weui-dialog">
                <div class="weui-dialog__bd weui-msg"></div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary weui-btn">知道了</a>
                </div>
        </div>
  </div>
  <div id="loadingToast" style="display:none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-loading weui-icon_toast"></i>
            <p class="weui-toast__content">照片上传中中</p>
        </div>
  </div>
  
</div>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
_h=h= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var sWidth = parseInt((window.innerWidth > 0) ? window.innerWidth : screen.width);
if(sWidth>640){sWidth=750;}
var _rate=(sWidth/750);
if(h<_rate*1334){
	h=_rate*1334;
}
$(".user").show().addClass("fade-in");
$(function(){
	$('.container, .page').width(sWidth).height(h);
	$('.p-bg').width(sWidth).height(_rate*1334);
	$('.user-title').css({"top":_rate*28});
    
    var _tmpTop=(h-_rate*1334)/2;
    if(_tmpTop < 0){_tmpTop=0;}
	$('.user-t1').width(sWidth).height(_rate*1334).css({"top":_tmpTop, "left":0});
    
    
   $('.user-txt').height(_rate*50).css({"left":_rate*180,'lineHeight':_rate*44+'px'});
   $('.user-hao').css({"left":_rate*220,"top":_rate*386});    
   $('.user-name').css({"top":_rate*465});    
   $('.user-school').css({"top":_rate*552});	 
   $('.user-zu').css({"top":_rate*636});
   $('.user-shijian').css({"top":_rate*724}); 
   $('.user-kc').css({"top":_rate*806});
   $('.user-kdian').css({"top":_rate*890});    
   $('.user-dizhi').css({"top":_rate*975}); 
   $('.user-jiaot').width(_rate*500).css({"left":_rate*180,"top":_rate*1028}); 
	 
	 
  
    
	$('.down-jk').width(_rate*215).height(_rate*110).css({"top":_rate*1160, "left":_rate*112});
    $('.down-zkao').width(_rate*215).height(_rate*110).css({"top":_rate*1160, "right":_rate*132});
	
	$(".down-zkao").click(function(){
        $.post("img.php", {id:1}, function(data){
			window.location.href="?c=print";
		}, "json");
	});

	
    if(!('placeholder' in document.createElement('input')) ){   
	    $('input[placeholder],textarea[placeholder]').each(function(){var that = $(this),text= that.attr('placeholder');   
	      if(that.val()===""){that.val(text).addClass('placeholder');}   
	      that.focus(function(){if(that.val()===text){that.val("").removeClass('placeholder');}})   
	      .blur(function(){if(that.val()===""){that.val(text).addClass('placeholder');}})   
	      .closest('form').submit(function(){   
	        if(that.val() === text){that.val('');}});});   
	}
	$(".weui-btn").click(function(){
        $(".js_dialog").hide();
	});
});
</script>
</body>
</html>